package com.muyan.thread;

import java.util.concurrent.CountDownLatch;

public class ThreadTest {

	public static void main(String[] args) throws InterruptedException {
		String[] arrayRule = {"000001","000002","000003"};

		CountDownLatch latch = new CountDownLatch(arrayRule.length);
		for (int i = 0; i < arrayRule.length; i++) {
			new Thread(new VoucherThread(arrayRule[i],latch)).start();
		}
		latch.await();
		System.out.println("所有线程执行完毕");
	}

}
